|
|
|
|
|
|
|
Figure 10.15.
Adding a combo box to the data-entry form. |
|
|
|
|
|
|
|
|
Then add another ADODC to the form and set its properties as shown in Table 10.4. |
|
|
|
|
| TABLE 10.4. PROPERTY SETTINGS FOR NEW DATA CONTROL. | | Property | Value | | Name | StateDB | | RecordSource | States | | Options | adCmdTable | | Visible | False |
|
|
|
|
|
|
The data-bound combo box (DBCombo control), similar in function to its standard counterpart, is designed to present users with a list of choices. The key difference is that a data-bound combo box control gets its list data from a recordset rather than from a series of add-item statements. The data-bound combo box is unique in that it lets you select separate fieldsone to display in the list and another to add to the entry record. Table 10.5 lists the properties you would use for the data-bound combo box. |
|
|
|
|
| TABLE 10.5. PROPERTIES OF THE DATA-BOUND COMBO BOX. | | Property | Value | Description | | Name | dbCboState | The name of the control | | BoundColumn | St_Abbrev | The name of the field containing the value to be copied to the other table | | DataField | State | The name of the target field | | DataSource | datPrimaryRS | The Data control containing the recordset that's the target of the information |
|
|
|
|
|
|
(table continued on next page) |
|
|
|
|
|